package com.android.smsmultibanking.smsreceiver;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class MyActivity extends Activity{
        public TextView text;

        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            text = (TextView) findViewById(R.id.text1);
        }

    @Override
    protected void onNewIntent(Intent intent) {
        Log.d("MyActivity", "onNewIntent is called!");

        String phoneNumber = intent.getStringExtra("phone");
        String msg = intent.getStringExtra("message");
        text.setText("Сообщение от: " + phoneNumber + "\nДанные: " + msg);

        super.onNewIntent(intent);

    }
}
